home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15631 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  867 b 

  1. Path: mail2news.demon.co.uk!lorelei.demon.co.uk
  2. From: John Croudy <john@lorelei.demon.co.uk>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: const member functions
  5. Date: Sun, 7 Apr 96 18:48:51 GMT
  6. Organization: home
  7. Message-ID: <9604071848.AA001nw@lorelei.demon.co.uk>
  8. References: <316588E6.7D61@geoplex.com>
  9. X-NNTP-Posting-Host: lorelei.demon.co.uk
  10. X-Newsreader: TIN [AMIGA 1.3 950726BETA PL0]
  11. X-Mail2News-Path: relay-4.mail.demon.net!post.demon.co.uk!lorelei.demon.co.uk
  12.  
  13. I tried removing the private method, and then it worked.  So it seems
  14. that the compiler will choose the const method for a non-const object
  15. only if there is no other suitable method defined.  If it finds a
  16. suitable non-const method it will choose that, even if it means it will
  17. fail because it is private.  It seems that the check for constness
  18. overrides the check for availability.  Hmm...
  19.  
  20. John
  21. xxxx
  22.